#region Using directives

using System;
using System.Drawing;

#endregion

namespace Hanoi.Ui
{
    /// <summary>
    /// Summary description for ColumsConfigUiConditioned.
    /// </summary>
    public class ColumnsConfigUiConditioned : ColumnsConfigUi
    {
        private int _notDispensable = -1;

        public int NotDispensable
        {
            get { return _notDispensable; }
            set { _notDispensable = value; }
        }

        public ColumnsConfigUiConditioned(int width, int height, int notDispensable)
            : base(width, height)
        {
            _notDispensable = notDispensable;
        }

        protected override System.Drawing.Color GetColor(int columnIndex)
        {
            if (columnIndex == _notDispensable)
                return Color.FromArgb(255, 127, 127);
            else if (columnIndex == _selected)
                return Color.FromArgb(127, 127, 255);
            else
                return Color.FromArgb(127, 255, 127);
        }
    }
}
